The objective of this project is to improve treatments for type 1 diabetes via optimization of a closed loop system by 1) incorporating exercise detection to reduce the risk of hypoglycemia and 2) improving usability by reducing the number of system components. Exercise commonly results in hypoglycemia in persons with type 1 diabetes due to a rapid increase in glucose uptake by working muscles as well as an increase in insulin sensitivity. To date, avoiding exercise-induced hypoglycemia using current closed loop systems has had limited success as most artificial pancreas (AP) algorithms are designed to react to declines in sensed glucose, and this decline may be significantly delayed from the onset of exercise. In this project, we propose to incorporate accelerometry and heart rate monitoring to allow for exercise detection and grading to enable more immediate algorithm adjustments to significantly decrease the risk of post-exercise hypoglycemia. First, 15 adult subjects with type 1 diabetes will be brought in for two closed loop studies while wearing an accelerometer and heart rate monitor. Subjects will exercise on a treadmill and bicycle at varying levels of intensity and these data will be utilized to develop a method of detecting and grading exercise. Glucose control will be managed by our team's current bi-hormonal AP algorithm, which automatically delivers insulin and glucagon, but without modifications to detect exercise. The performance of our current AP system as well as results from simulations will guide the design of an Adaptive Personalized Exercise-sensing (APE) algorithm. We anticipate the APE algorithm will effect changes in estimated insulin sensitivity, the update interval of the sensitivity estimates, and wil raise the glucose target which will effectively call for glucagon delivery earlier. In a second study, subjects will be brought in for three closed loop studies: a control study using the unmodified algorithm, a second study utilizing the APE algorithm, and a third study with an optimized APE algorithm. We hypothesize that use of the AP algorithm will significantly reduce the frequency and severity of hypoglycemia. In parallel with the above studies, the team of Drs. Jacob and Castle will be collaborating with the engineers of Tandem Diabetes and Pacific Diabetes Technologies to reduce the number of devices which the patient must wear or carry from 12 eventually down to 3. The final miniaturized system will include integration of a new dual- purpose glucose-sensing catheter (SC) into the AP platform. This catheter will serve as a conduit for insulin and glucagon delivery, which will be infused using a dual chamber pump. The SC also has multiple glucose sensing units, and these glucose values will be transmitted via Bluetooth Low Energy to a smart phone that will run the APE algorithm. This miniaturized system will be tested in inpatient and outpatient closed loop studies.